package com.goldwind.login.dao;
import com.goldwind.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {

    @Select("SELECT * FROM user where email = #{email}")
    User queryByEmail(String email);

    @Insert("INSERT INTO USER(USERNAME, PASSWORD, EMAIL, STATUS,avatar,balance) VALUES(#{userName}, #{password},#{email}, #{status},#{avatar},0)")
    int insertUser(User user);
}
